//# sourceURL=http://uMapApp/UI/Search
define([
    "mhjs/mhjs"
], function (
    mhjs
) {

    function Search(option) {

        var _this = this;
        _this.isOpened = false;

        _this.ui = _this.ui || {};
        _this.ui.icon = new mhjs.Div({"class": "icon"});
        _this.ui.input = new mhjs.Input({
            "class"      : "input",
            "type"       : "text",
            "placeholder": "请输入搜索关键字"
        });

        mhjs.Div.call(_this, option);
        _this.addClass("search");

        _this.ui.input.on("change", function (ele, event) {
            _this.trigger("change", _this, event);
        });

        _this
            .append(_this.ui.icon)
            .append(_this.ui.input);

    }

    var _class = Search;
    mhjs.Inherit(_class, mhjs.Div);


    Object.defineProperties(_class.prototype, {
        "value": {
            set: function (value) {
                this.ui.input.value = value;
            },
            get: function () {
                return this.ui.input.value;
            }
        }
    });

    return _class;

});